/*!
\copyright  Copyright (c) 2017 - 2023 Qualcomm Technologies International, Ltd.\n
            All Rights Reserved.\n
            Qualcomm Technologies International, Ltd. Confidential and Proprietary.
\file
\brief      Definitions of audio capability IDs
*/

#ifndef EARBUD_CAP_IDS_H
#define EARBUD_CAP_IDS_H


#ifdef INCLUDE_GAA
#include <gaa_cap_ids.h>
#endif

#ifdef INCLUDE_AMA
#include <ama_cap_ids.h>
#endif

#ifdef INCLUDE_WUW
#define DOWNLOAD_VA_GRAPH_MANAGER
#endif

#if defined(__QCC304X__) || defined(__QCC514X__)
#define DOWNLOAD_APTX_ADAPTIVE_DECODE
#define DOWNLOAD_SWITCHED_PASSTHROUGH
#define DOWNLOAD_CVC_FBC
#ifdef ENABLE_ADAPTIVE_ANC
#define DOWNLOAD_ADAPTIVE_ANC
#endif
#ifdef ENABLE_EARBUD_FIT_TEST
#define DOWNLOAD_EARBUD_FIT_TEST
#endif
#endif


#if defined(__QCC305X__) || defined(__QCC515X__)
#define DOWNLOAD_APTX_CLASSIC_DEMUX
#define DOWNLOAD_SWBS_ENC_DEC
#ifdef INCLUDE_LE_AUDIO_UNICAST
#define DOWNLOAD_LC3_ENCODE_SCO_ISO
#endif
#ifdef ENABLE_ADAPTIVE_ANC
#define DOWNLOAD_ADAPTIVE_ANC
#endif
#ifdef ENABLE_EARBUD_FIT_TEST
#define DOWNLOAD_EARBUD_FIT_TEST
#endif
#endif


#if defined(__QCC307X__) || defined(__QCC517X__)
#define SPLITTER_DOWNLOAD
#ifdef ENABLE_ADAPTIVE_ANC
#define DOWNLOAD_ADAPTIVE_ANCV2
#define DOWNLOAD_AHM
#define DOWNLOAD_ADRC
#define DOWNLOAD_HCGR
#define DOWNLOAD_AAH
#define DOWNLOAD_NOISE_ID
#ifdef ENABLE_WIND_DETECT
#define DOWNLOAD_WIND_DETECT
#endif
#ifdef ENABLE_AUTO_AMBIENT
#define DOWNLOAD_ATR_VAD
#endif
#endif
#ifdef ENABLE_EARBUD_FIT_TEST
#define DOWNLOAD_EARBUD_FIT_TEST
#endif
#ifdef INCLUDE_APTX_ADAPTIVE_22
#define DOWNLOAD_APTX_ADAPTIVE_R3
#endif
#if defined(INCLUDE_LE_APTX_ADAPTIVE)
#define DOWNLOAD_APTX_ADAPTIVE_DECODE_SCO_ISO
#endif

#ifndef AUDIO_IN_SQIF
#define DOWNLOAD_SWBS_ENC_DEC
#ifdef INCLUDE_LE_AUDIO_UNICAST
#define DOWNLOAD_LC3_ENCODE_SCO_ISO
#endif /* INCLUDE_LE_AUDIO_UNICAST */
#if defined(INCLUDE_LE_AUDIO_UNICAST) || defined(INCLUDE_LE_AUDIO_BROADCAST)
#define DOWNLOAD_LC3_DECODE_SCO_ISO
#if defined(INCLUDE_LE_AUDIO_GAMING_MODE_APTX_LITE)
#define DOWNLOAD_APTX_LITE_DECODE_SCO_ISO
#define DOWNLOAD_APTX_LITE_ENCODE_SCO_ISO
#endif /* INCLUDE_LE_AUDIO_GAMING_MODE_APTX_LITE */
#endif /* INCLUDE_LE_AUDIO_UNICAST || INCLUDE_LE_AUDIO_BROADCAST*/
#endif /* AUDIO_IN_SQIF */
#endif

#ifdef KYMERA_SCO_USE_3MIC
#define DOWNLOAD_CVC_3MIC
#endif

#ifdef DOWNLOAD_AAC_DECODER
#define EB_CAP_ID_AAC_DECODER CAP_ID_DOWNLOAD_AAC_DECODER
#else
#define EB_CAP_ID_AAC_DECODER CAP_ID_AAC_DECODER
#endif

#ifdef DOWNLOAD_SWITCHED_PASSTHROUGH
#define EB_CAP_ID_SWITCHED_PASSTHROUGH   CAP_ID_DOWNLOAD_SWITCHED_PASSTHROUGH_CONSUMER
#else
#define EB_CAP_ID_SWITCHED_PASSTHROUGH   CAP_ID_SWITCHED_PASSTHROUGH_CONSUMER
#endif

#ifdef DOWNLOAD_APTX_CLASSIC_DEMUX
#define EB_CAP_ID_APTX_CLASSIC_DEMUX     CAP_ID_DOWNLOAD_APTX_CLASSIC_DEMUX
#else
#define EB_CAP_ID_APTX_CLASSIC_DEMUX     CAP_ID_APTX_CLASSIC_DEMUX
#endif

#ifdef DOWNLOAD_AEC_REF
#define CAP_ID_AEC_REF                CAP_ID_DOWNLOAD_AEC_REFERENCE
#else
#define CAP_ID_AEC_REF                CAP_ID_AEC_REFERENCE
#endif

#ifdef DOWNLOAD_ADAPTIVE_ANC
#define EB_CAP_ID_ADAPTIVE_ANC_REF       CAP_ID_DOWNLOAD_AANC_MONO_16K
#else
#define EB_CAP_ID_ADAPTIVE_ANC_REF       CAP_ID_AANC_MONO_16K
#endif

#ifdef DOWNLOAD_ADAPTIVE_ANCV2
#define EB_CAP_ID_ADAPTIVE_ANCV2_REF       0x40A0
#else
#define EB_CAP_ID_ADAPTIVE_ANCV2_REF       0x00C8
#endif

#ifdef DOWNLOAD_WIND_DETECT
#define EB_CAP_ID_WIND_DETECT       0x40C0
#else
#define EB_CAP_ID_WIND_DETECT       0x00DF
#endif

#ifdef DOWNLOAD_ATR_VAD
#define EB_CAP_ID_ATR_VAD       0x40C9
#define EB_CAP_ID_PEQ           CAP_ID_PEQ
#else
#define EB_CAP_ID_ATR_VAD       0x00E3
#define EB_CAP_ID_PEQ           CAP_ID_PEQ
#endif

#ifdef DOWNLOAD_AAH
#define EB_CAP_ID_AAH           0x40D0
#else
#define EB_CAP_ID_AAH           0x00EA
#endif

#ifdef DOWNLOAD_NOISE_ID
#define EB_CAP_ID_NOISE_ID           0x40D1
#else
#define EB_CAP_ID_NOISE_ID           0x00EB
#endif


#ifdef DOWNLOAD_APTX_ADAPTIVE_DECODE
#define EB_CAP_ID_APTX_ADAPTIVE_DECODE   CAP_ID_DOWNLOAD_APTX_ADAPTIVE_DECODE
#else
#define EB_CAP_ID_APTX_ADAPTIVE_DECODE   CAP_ID_APTX_ADAPTIVE_DECODE
#endif

#ifdef DOWNLOAD_ASYNC_WBS_DEC
#define EB_CAP_ID_ASYNC_WBS_DEC          CAP_ID_DOWNLOAD_ASYNC_WBS_DEC
#else
#define EB_CAP_ID_ASYNC_WBS_DEC          CAP_ID_ASYNC_WBS_DEC
#endif

#ifdef DOWNLOAD_ASYNC_WBS_ENC
#define EB_CAP_ID_ASYNC_WBS_ENC          CAP_ID_DOWNLOAD_ASYNC_WBS_ENC
#else
#define EB_CAP_ID_ASYNC_WBS_ENC          CAP_ID_ASYNC_WBS_ENC
#endif

#ifdef DOWNLOAD_VOLUME_CONTROL
#define CAP_ID_OUTPUT_VOL_CTRL                CAP_ID_DOWNLOAD_VOL_CTRL_VOL
#else
#define CAP_ID_OUTPUT_VOL_CTRL                CAP_ID_VOL_CTRL_VOL
#endif

#ifdef DOWNLOAD_OPUS_CELT_ENCODE
#define EB_CAP_ID_OPUS_ENC          CAP_ID_DOWNLOAD_OPUS_CELT_ENCODE
#else
#define EB_CAP_ID_OPUS_ENC          CAP_ID_OPUS_CELT_ENCODE
#endif

#ifdef DOWNLOAD_VA_GRAPH_MANAGER
#define EB_CAP_ID_VA_GRAPH_MANAGER CAP_ID_DOWNLOAD_VA_GRAPH_MANAGER
#else
#define EB_CAP_ID_VA_GRAPH_MANAGER CAP_ID_VA_GRAPH_MANAGER
#endif

#ifdef DOWNLOAD_CVC_FBC
#define EB_CAP_ID_CVC_FBC CAP_ID_DOWNLOAD_CVC_FBC
#else
#define EB_CAP_ID_CVC_FBC CAP_ID_CVC_FBC
#endif

#if defined(__QCC307X__) || defined(__QCC517X__)
#ifdef DOWNLOAD_CVC_3MIC
#ifdef INCLUDE_HYBRID_CVC
#define EB_CAP_ID_CVC_3MIC_NB  CAP_ID_DOWNLOAD_CVCEB3MIC_HYBRID_WB // NB and WB share CAP ID
#define EB_CAP_ID_CVC_3MIC_WB  CAP_ID_DOWNLOAD_CVCEB3MIC_HYBRID_WB
#define EB_CAP_ID_CVC_3MIC_SWB CAP_ID_DOWNLOAD_CVCEB3MIC_HYBRID_SWB
#else /* INCLUDE_HYBRID_CVC */
#define EB_CAP_ID_CVC_3MIC_NB  CAP_ID_DOWNLOAD_CVCEB3MIC_MONO_IE_NB
#define EB_CAP_ID_CVC_3MIC_WB  CAP_ID_DOWNLOAD_CVCEB3MIC_MONO_IE_WB
#define EB_CAP_ID_CVC_3MIC_SWB CAP_ID_DOWNLOAD_CVCEB3MIC_MONO_IE_SWB
#endif /* INCLUDE_HYBRID_CVC */
#else /* DOWNLOAD_CVC_3MIC */
#define EB_CAP_ID_CVC_3MIC_NB  CAP_ID_CVCEB3MIC_MONO_IE_NB
#define EB_CAP_ID_CVC_3MIC_WB  CAP_ID_CVCEB3MIC_MONO_IE_WB
#define EB_CAP_ID_CVC_3MIC_SWB CAP_ID_NONE
#endif /* DOWNLOAD_CVC_3MIC */
#else /* defined(__QCC307X__) || defined(__QCC517X__) */
#define EB_CAP_ID_CVC_3MIC_NB  CAP_ID_NONE
#define EB_CAP_ID_CVC_3MIC_WB  CAP_ID_NONE
#define EB_CAP_ID_CVC_3MIC_SWB CAP_ID_NONE
#endif /* defined(__QCC307X__) || defined(__QCC517X__) */

#ifdef INCLUDE_HYBRID_CVC
#define CAP_ID_CVC_2MIC_NB  CAP_ID_DOWNLOAD_CVCHS2MIC_MONO_SEND_HYBRID_WB
#define CAP_ID_CVC_2MIC_WB  CAP_ID_DOWNLOAD_CVCHS2MIC_MONO_SEND_HYBRID_WB
#define CAP_ID_CVC_2MIC_SWB CAP_ID_DOWNLOAD_CVCHS2MIC_MONO_SEND_HYBRID_SWB
#else /* INCLUDE_HYBRID_CVC */
#define CAP_ID_CVC_2MIC_NB  CAP_ID_CVCHS2MIC_MONO_SEND_NB
#define CAP_ID_CVC_2MIC_WB  CAP_ID_CVCHS2MIC_MONO_SEND_WB
#define CAP_ID_CVC_2MIC_SWB CAP_ID_CVCHS2MIC_MONO_SEND_SWB
#endif /* INCLUDE_HYBRID_CVC */

#define CAP_ID_VA_CVC_1MIC EB_CAP_ID_CVC_FBC
#define CAP_ID_VA_CVC_2MIC CAP_ID_CVCHS2MIC_BARGEIN_WB


#ifdef DOWNLOAD_SWBS_ENC_DEC
#define CAP_ID_SCO_SWBS_ENC CAP_ID_DOWNLOAD_SWBS_ENC
#define CAP_ID_SCO_SWBS_DEC CAP_ID_DOWNLOAD_SWBS_DEC
#else
#define CAP_ID_SCO_SWBS_ENC CAP_ID_SWBS_ENC
#define CAP_ID_SCO_SWBS_DEC CAP_ID_SWBS_DEC
#endif

#ifdef DOWNLOAD_GVA
#define CAP_ID_VA_GVA CAP_ID_DOWNLOAD_GVA
#else
    #if defined(INCLUDE_GAA) && defined(INCLUDE_GAA_WUW)
        #error GAA with Wake-up word functionality needs the DOWNLOAD_GVA define and download_gva capability
    #endif
/* This capability, if present, is always a downloadable */
#define CAP_ID_VA_GVA CAP_ID_NONE
#endif

#ifdef DOWNLOAD_APVA
#define CAP_ID_VA_APVA CAP_ID_DOWNLOAD_APVA
#else
    #if defined(INCLUDE_AMA) && defined(INCLUDE_AMA_WUW)
        #error AMA with Wake-up word functionality needs the DOWNLOAD_APVA define and download_apva capability
    #endif
/* This capability, if present, is always a downloadable */
#define CAP_ID_VA_APVA CAP_ID_NONE
#endif

#ifdef DOWNLOAD_LC3_ENCODE_SCO_ISO
#define CAP_ID_LC3_SCO_ISO_ENC    0x409A //CAP_ID_DOWNLOAD_LC3_ENCODE_SCO_ISO
#else
#define CAP_ID_LC3_SCO_ISO_ENC    0X00C4 //CAP_ID_LC3_ENCODE_SCO_ISO
#endif

#ifdef DOWNLOAD_LC3_DECODE_SCO_ISO
#define CAP_ID_LC3_SCO_ISO_DEC 0x4098 /*CAP_ID_DOWNLOAD_LC3_DECODE_SCO_ISO*/
#else
#define CAP_ID_LC3_SCO_ISO_DEC 0x00C2 /*CAP_ID_LC3_DECODE_SCO_ISO*/
#endif

#ifdef DOWNLOAD_APTX_LITE_ENCODE_SCO_ISO
#define CAP_ID_APTX_LITE_SCO_ISO_ENC    0x40D5 /* CAP_ID_DOWNLOAD_APTX_LITE_ENCODE_SCO_ISO */
#else
#define CAP_ID_APTX_LITE_SCO_ISO_ENC    CAP_ID_NONE
#endif

#ifdef DOWNLOAD_APTX_LITE_DECODE_SCO_ISO
#define CAP_ID_APTX_LITE_SCO_ISO_DEC    0x40D6 /*CAP_ID_DOWNLOAD_APTX_LITE_DECODE_SCO_ISO*/
#else
#define CAP_ID_APTX_LITE_SCO_ISO_DEC    CAP_ID_NONE
#endif

#ifdef DOWNLOAD_EARBUD_FIT_TEST
#define EB_CAP_ID_EARBUD_FIT_TEST       0x40A2
#else
#define EB_CAP_ID_EARBUD_FIT_TEST       0x00CA
#endif

#ifdef DOWNLOAD_AHM
#define EB_CAP_ID_AHM                   0x40B8
#else
#define EB_CAP_ID_AHM                   0x0000
#endif

#ifdef DOWNLOAD_ADRC
#define EB_CAP_ID_ADRC                  0x40B7
#else
#define EB_CAP_ID_ADRC                  0x0000
#endif

#ifdef DOWNLOAD_HCGR
#define EB_CAP_ID_HCGR                  0x40B9
#else
#define EB_CAP_ID_HCGR                  0x0000
#endif

#ifdef DOWNLOAD_APTX_ADAPTIVE_R3
#define EB_CAP_ID_APTX_ADAPTIVE_R3_MONO_DECODE     CAP_ID_DOWNLOAD_APTX_ADAPTIVE_R3_MONO_DECODE
#define EB_CAP_ID_APTX_ADAPTIVE_R3_STEREO_DECODE   CAP_ID_DOWNLOAD_APTX_ADAPTIVE_R3_STEREO_DECODE
#else
#define EB_CAP_ID_APTX_ADAPTIVE_R3_MONO_DECODE     0x0000
#define EB_CAP_ID_APTX_ADAPTIVE_R3_STEREO_DECODE   0x0000
#endif

#ifdef DOWNLOAD_APTX_ADAPTIVE_DECODE_SCO_ISO
#define CAP_ID_APTX_ADAPTIVE_SCO_ISO_DEC 0x40C4 /*DOWNLOAD_APTX_ADAPTIVE_DECODE_SCO_ISO*/
#else
#define CAP_ID_APTX_ADAPTIVE_SCO_ISO_DEC 0x0000
#endif

#endif // EARBUD_CAP_IDS_H
